from tools.utils import do_rest


class QueryInfoPage():
    """用户管理界面的查询接口"""

    def __init__(self):
        self.url = 'https://xxxxxx/xx'

    def query_user(self, opName):
        """查询用户"""
        data = {"cdt": {"opName": opName}, "pageNum": 1, "pageSize": 500}
        response = do_rest(self.url, data, 'post')
        # print(response.text)
        return response.json()

# a = QueryInfoPage()
# b = a.query_user('qiqi')['data']['data'][0]['op']['id']
# print(b)